package com.hz.copyingsystem.service.impl;

import com.hz.copyingsystem.entity.CbStiffTypefaceEntity;
import com.hz.copyingsystem.vo.CopybookCharacterInformationVo;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;

import com.hz.copyingsystem.dao.CopybookCharacterInformationDao;
import com.hz.copyingsystem.entity.CopybookCharacterInformationEntity;
import com.hz.copyingsystem.service.CopybookCharacterInformationService;


@Service("copybookCharacterInformationService")
public class CopybookCharacterInformationServiceImpl extends ServiceImpl<CopybookCharacterInformationDao, CopybookCharacterInformationEntity> implements CopybookCharacterInformationService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CopybookCharacterInformationEntity> page = this.page(
                new Query<CopybookCharacterInformationEntity>().getPage(params),
                new QueryWrapper<CopybookCharacterInformationEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public CopybookCharacterInformationVo getCopybookCharacter(char character, String characterType, List<String> calligrapherList) {
        return this.baseMapper.getCopybookCharacter(character, characterType, calligrapherList);
    }

    @Override
    public List<CopybookCharacterInformationEntity> getCopybookCharacterInforByIds(List<Long> idList) {
        return this.baseMapper.getCopybookCharacterInforByIds(idList);
    }

    @Override
    public List<CopybookCharacterInformationEntity> getCbCharaInforListByContent(char character) {
        return this.baseMapper.getCbCharaInforListByContent(character);
    }

    @Override
    public CbStiffTypefaceEntity getCbStiffTypefaceByContent(String content) {
        return this.baseMapper.getCbStiffTypefaceByContent(content);
    }

}